package torres.map.tile;

import java.io.Serializable;

import torres.map.effect.AreaEffect;
import torres.entity.Entity;
import torres.item.Item;

/**
 * @author Torres
 * Represents a "map unit". Allows up to one entity, item, and effect
 * to be applied.
 */
public interface Tile extends Serializable {
	
	
	/**
	 * Adds the specified Entity to this Tile.
	 * @param entity The Entity to be added to this Tile.
	 */
	public void addEntity(Entity entity);
	
	/**
	 * Adds the specified Item to this Tile.
	 * @param entity The Item to be added to this Tile.
	 */
	public void addItem(Item item);
	
	/**
	 * Adds the specified Terrain to this Tile.
	 * @param entity The Terrain to be added to this Tile.
	 */
	public void addTerrain(Terrain terrain);
	
	/**
	 * Adds the specified Effect to this Tile.
	 * @param entity The Effect to be added to this Tile.
	 */
	public void addEffect(AreaEffect effect);
	
	/**
	 * Removes the Entity from this Tile, if it exists.
	 */
	public void removeEntity();
	
	/**
	 * Removes the Item from this Tile, if it exists.
	 */
	public void removeItem();
	
	/**
	 * Removes the Effect from this Tile, if it exists.
	 */
	public void removeEffect();
	
	
	/**
	 * Returns the Entity that is occupying this Tile, if it exists.
	 * @return The Entity that is occupying this Tile if it exists, null otherwise.
	 */
	public Entity getEntity();
	
	/**
	 * Returns the Item that is occupying this Tile, if it exists.
	 * @return The Item that is occupying this Tile if it exists, null otherwise.
	 */
	public Item getItem();
	
	/**
	 * Returns the Effect that is occupying this Tile, if it exists.
	 * @return The Effect that is occupying this Tile if it exists, null otherwise.
	 */
	public AreaEffect getEffect();
	
	/**
	 * Returns the Terrain of this tile.
	 * @return The Terrain of this tile.
	 */
	public Terrain getTerrain();
	
	
	/**
	 * Returns the name of the image associated with this Tile
	 * @return The name of the image associated with this Tile
	 */
	public String getImageName();
	
	/**
	 * Tests to see if this Tile has an Entity on it.
	 * @return True if there is an Entity on this Tile, false otherwise.
	 */
	public boolean hasEntity();
	
	/**
	 * Tests to see if this Tile has an Item on it.
	 * @return True if there is an Item on this Tile, false otherwise.
	 */
	public boolean hasItem();
	
	/**
	 * Tests to see if this Tile has an Effect on it.
	 * @return True if there is an Effect on this Tile, false otherwise.
	 */
	public boolean hasEffect();
}
